import { post, put, get } from '@/utils/httpUtils/httpRequest'

export const sysAdminColumns = [
    {
        title: "工号",
        dataIndex: "uuid",
    },
    {
        title: "账号",
        dataIndex: "account",
    },
    {
        title: "昵称",
        dataIndex: "nickName",
    },
    {
        title: "微信",
        dataIndex: "weiXin",
    },
    {
        title: "所属用户组",
        dataIndex: "userGroupId",
        scopedSlots: { customRender: "userGroupId" },
    },
    {
        align: 'center',
        title: "所属角色",
        dataIndex: "roleId",
        scopedSlots: { customRender: "roleId" },
    }, 
    {
        align: 'center',
        title: "投放开关",
        dataIndex: "isPush",
        scopedSlots: { customRender: "isPush" },
    },
    {
        align: 'center',
        title: "状态",
        dataIndex: "status",
        scopedSlots: { customRender: "status" },
    },
    {
        align: 'center',
        title: "创建时间",
        dataIndex: "createTime",
        sorter: true,
    },
    {
        align: 'center',
        title: "操作",
        dataIndex: "action",
        scopedSlots: { customRender: "action" },
    },
];

export const addSysAdmin = (parameter) => post('api/sysAdmin/add', parameter)
export const deleteSysAdmin = (parameter) => post('api/sysAdmin/delete', parameter)
export const updateSysAdmin = (parameter) => put('api/sysAdmin/update', parameter)
export const querySysAdmin = (parameter) => get('api/sysAdmin/queryPage', parameter)
export const getSysAdmin = (parameter) => get('api/sysAdmin/get', parameter)
export const updatePwd = (parameter) => put('api/sysAdmin/updatePwd', parameter)
export const resetPwd = (parameter) => put('api/sysAdmin/resetPwd', parameter)
export const updateStatus = (parameter) => put('api/sysAdmin/updateStatus', parameter)



